package com.guigu.tms.work.service.impl;

import com.guigu.tms.commons.entity.base.TruckDriver;
import com.guigu.tms.work.mapper.AuthUserMapper;
import com.guigu.tms.work.mapper.TruckDriverMapper;
import com.guigu.tms.work.service.ITruckDriverService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 司机表 服务实现类
 * </p>
 *
 * @author zwj
 * @since 2022-09-29
 */
@Service
public class TruckDriverServiceImpl extends ServiceImpl<TruckDriverMapper, TruckDriver> implements ITruckDriverService {
    @Autowired
    TruckDriverMapper truckDriverMapper;
    @Autowired
    AuthUserMapper authUserMapper;
    @Override
    public TruckDriver GetAuthUserAndPutInTruckDriver(TruckDriver truckDriver) {
        truckDriver.setUser(authUserMapper.selectById(truckDriver.getUserId()));
        return truckDriver;
    }
}
